docs: Export migrate_filenames functions in lib package#19
docs: Export migrate_filenames functions in lib package#19github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
- Add migrate_all, migrate_file, is_migration_complete, migration_summary to lib/__init__.py - Update library-reference.md to show both direct and convenience import patterns - Ensures documented API matches actual exports Fixes documentation gap where migrate_filenames functions were documented but not accessible via 'from lib import ...' syntax. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Closing: PR #21 (aggressive simplification) made these changes obsolete. |
There was a problem hiding this comment.
Pull request overview
This PR closes an API/documentation gap by making lib.migrate_filenames’s public functions available via from lib import ..., aligning the library’s convenience-import surface with the library reference docs.
Changes:
- Re-export
migrate_filenameshelpers (migrate_all,migrate_file,is_migration_complete,migration_summary) fromlib/__init__.pyand add them tolib.__all__. - Update the docs import cheat sheet to show both direct module imports and convenience imports from
lib.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/init.py | Adds convenience exports + __all__ entries for migration helpers. |
| docs/library-reference.md | Documents convenience-import alternatives in the Import Cheat Sheet. |
| # Make paths module easily importable | ||
| from .memory_reader import ( | ||
| get_memory_metadata, | ||
| get_memory_summary, | ||
| ) | ||
| from .migrate_filenames import ( | ||
| is_migration_complete, |
There was a problem hiding this comment.
The comment # Make paths module easily importable is now misleading since this package __init__ also re-exports memory_reader/migration/search/etc. Consider updating or removing the comment to reflect the broader purpose of these convenience imports.
| from lib import get_memory_metadata, get_memory_summary | ||
|
|
||
| # Migration | ||
| from lib.migrate_filenames import migrate_all, is_migration_complete |
There was a problem hiding this comment.
In the Migration section, the direct-module import lists only migrate_all and is_migration_complete, but the convenience import lists additional public functions (migrate_file, migration_summary). To avoid confusing users, either include the same set of functions in the direct-module example or explain why the sets differ.
| from lib.migrate_filenames import migrate_all, is_migration_complete | |
| from lib.migrate_filenames import migrate_all, migrate_file, is_migration_complete, migration_summary |
Summary
Fixes documentation gap where
migrate_filenamesmodule functions were documented but not accessible via convenience imports from thelibpackage.Changes
migrate_all,migrate_file,is_migration_complete, andmigration_summaryfunctionslibContext
The recent commit b05782a documented the
migrate_filenamesmodule in the library reference, but the functions were not added tolib/__init__.py. This meant users could only use:But not the convenience import pattern documented elsewhere:
Testing
Verified all documented functions are now importable:
All imports succeed, and
lib.__all__now includes these functions.Documentation Impact